home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-06-03 | 40.0 KB | 1,007 lines |
- C.S.M.P. Digest Mon, 20 Apr 92 Volume 1 : Issue 55
-
- Today's Topics:
-
- Alternative Mac programming languages?
- making a backup "template" of THINK C project ?
- mem/proc-manager, heapzone?
- THINK C wish - tags?
- Comm Toolbox Code Snippets?
- How do I plot icons?
- Think C 5.0.2 and MacTCP DNR...
- Where do I submit my freeware app?
- Programmer furniture
-
-
- The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
-
- These digests are available (by using FTP, account anonymous, your email
- address as password) in the pub/mac/csmp-digest directory on ftp.cs.uoregon.
- edu. This is also the home of the comp.sys.mac.programmer Frequently Asked
- Questions list. The last several issues of the digest are available from
- sumex-aim.stanford.edu as well.
-
- These digests are also available via email. Just send a note saying that you
- want to be on the digest mailing list to mkelly@cs.uoregon.edu, and you will
- automatically receive each new digest as it is created.
-
- The articles in these digests are taken directly from comp.sys.mac.programmer.
- They are not edited; all articles included in this digest are in their original
- posted form. The only articles that are -not- included in these digests are
- those which didn't receive any replies (except those that give information
- rather than ask a question). All replies to each article are concatenated
- onto the original article in the order in which they were received. Article
- threads are not added to the digests until the last article added to the
- thread is at least one month old (this is to ensure that the thread is dead
- before adding it to the digests).
-
- Send administrative mail to mkelly@cs.uoregon.edu.
-
- -------------------------------------------------------
-
- From: Brad Taplin <btaplin@silver.ucs.indiana.edu>
- Subject: Alternative Mac programming languages?
- Organization: Indiana University
- Date: Sun, 8 Mar 1992 09:08:26 -0500
-
- Hello,
-
- I have been swimming into the deep dark waters of
- C programming and have begun to wonder if there's
- another language that might provide for both fast
- prototyping and complete, tight coding for the Mac.
-
- In the world of Microsoft Windows (gasp!) a common
- approach is to prototype in Visual Basic then code
- in something more powerful, usually C. The makers
- of Smalltalk/V suggest that applications written
- with their product can be prototyped in a day, and
- then reworked into powerful programs incrementally
- without the sacrifice of that first day's coding.
-
- Is this true? Is there something comparable in
- the Mac world? It seems that although C functions
- and now classes provide for modularity, debugging
- and integration of these into main() remains too
- painful and time-consuming for easy prototyping
- or quick rewrites. Wanna tinker without headaches.
-
- Apologies to all you power-hackers. I do respect
- the amazing capabilities of C, but imagine it
- better suited to systems work and power-coding
- than to my experimental programming on a micro.
-
- +++++++++++++++++++++++++++
-
- From: steve@oceania.com (Steve Dakin)
- Organization: Oceania Health Care Systems
- Date: Tue, 10 Mar 92 01:04:05 GMT
-
- In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> Brad Taplin
- <btaplin@silver.ucs.indiana.edu> writes:
-
- > I have been swimming into the deep dark waters of
- > C programming and have begun to wonder if there's
- > another language that might provide for both fast
- > prototyping and complete, tight coding for the Mac.
-
- Stepstone recently announced Objective-C for the Macintosh. I have found it
- successfully addresses the points you mentioned: "fast prototyping and
- complete, tight coding." You might want to check it out. Stepstone can be
- reached at: 1-800-289-6253 (1-800-BUY-OBJECT for those of you who like letters
- in your phone numbers).
- - --
- Steve Dakin Oceania Health Care Systems
- steve@oceania.com (NeXT mail) Palo Alto, CA (415) 322-0127
- jester@oceania.com Cogito ergo sum un fanaticus Marillionus
- All the best freaks are here: go09+freaks@andrew.cmu.edu
-
- +++++++++++++++++++++++++++
-
- From: gregf@shaman.sps.mot.com (Greg Ferguson)
- Date: 9 Mar 92 23:50:20 GMT
- Organization: Motorola Semiconductor Products Sector
-
- In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> Brad Taplin
- <btaplin@silver.ucs.indiana.edu> writes:
- > Hello,
- >
- > I have been swimming into the deep dark waters of
- > C programming and have begun to wonder if there's
- > another language that might provide for both fast
- > prototyping and complete, tight coding for the Mac.
- >
- > In the world of Microsoft Windows (gasp!) a common
- > approach is to prototype in Visual Basic then code
- > in something more powerful, usually C. The makers
- > of Smalltalk/V suggest that applications written
- > with their product can be prototyped in a day, and
- > then reworked into powerful programs incrementally
- > without the sacrifice of that first day's coding.
- >
- > Is this true? Is there something comparable in
- > the Mac world? It seems that although C functions
- > and now classes provide for modularity, debugging
- > and integration of these into main() remains too
- > painful and time-consuming for easy prototyping
- > or quick rewrites. Wanna tinker without headaches.
- >
- > Apologies to all you power-hackers. I do respect
- > the amazing capabilities of C, but imagine it
- > better suited to systems work and power-coding
- > than to my experimental programming on a micro.
-
- You could use HyperCard. I like it for prototyping. Also, Prograph might
- work for that purpose. It's a compiled language so you could go with the
- Prograph front end and use C or Pascal for the code chunks that need to be
- lean 'n mean.
-
- Thats just my thoughts.
-
- Greg
-
- +++++++++++++++++++++++++++
-
- From: rfl@oddjob.uchicago.edu (Bob Loewenstein)
- Date: 10 Mar 92 15:18:50 GMT
- Organization: U. of Chicago, Astronomy and Astrophysics
-
-
- > I have been swimming into the deep dark waters of
- > C programming and have begun to wonder if there's
- > another language that might provide for both fast
- > prototyping and complete, tight coding for the Mac.
-
- You might want to check out Yerk or Mops, true alternative languages
- for the mac. They both are available through anonymous ftp at
- oddjob.uchicago.edu in directory pub/Yerk.
-
- Both are related to Neon, the object oriented Forthlike language for
- the mac. Development is very fast. Yerk is threaded interpreted while
- Mops is threaded subroutine. Mops' speed of execution is as fast
- as C, while Yerk is more like Forth...about 2-3x slower than c.
-
- +++++++++++++++++++++++++++
-
- From: ksand@apple.com (Kent Sandvik)
- Date: 13 Mar 92 02:44:12 GMT
- Organization: MacDTS Mongols
-
- In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu>,
- btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
- >
- > Hello,
- >
- > I have been swimming into the deep dark waters of
- > C programming and have begun to wonder if there's
- > another language that might provide for both fast
- > prototyping and complete, tight coding for the Mac.
- >
- > In the world of Microsoft Windows (gasp!) a common
- > approach is to prototype in Visual Basic then code
- > in something more powerful, usually C. The makers
- > of Smalltalk/V suggest that applications written
- > with their product can be prototyped in a day, and
- > then reworked into powerful programs incrementally
- > without the sacrifice of that first day's coding.
-
- Finally a question I would gladly like to answer! Forget Visual
- Basic - if Microsoft answer to MIS prototyping is Basic, then
- it clearly shows what kind of grand vision this company has in mind
- concerning future software development.
-
- The three languages/systems I would recommend to check out are:
-
- Smalltalk/V. Yes the MacOS version is behind the Windows one, but
- this will change soon.
-
- MCL - even if the cost is high, 495$US, it's cheap compared with
- the Windows Common Lisp offerings. Learning CLOS is a good way
- to get prepared for future dynamic object oriented languages.
-
- Serius/Prograph. Both are visual languages, and have their followers.
- Anyway, these two are good candidates concerning true visual
- programming (Visual-Basic :-) ).
-
- Anyway,also check out Gambit, a nice Scheme for MacOS including
- a kit for writing code modules. Also SIOD (Scheme in one Defun)
- is a way to implement a small Scheme interpreter inside an application
- framework which could be used for a small language interpreter.
-
- Note that in many cases you could write modules in C/C++, and then
- glue them together using a dynamic language. I personally think this
- is the best approach, you will get both better performance, and rapid
- prototyping and testing.
-
- Hope this helps,
- Kent
-
- - --
- Kent Sandvik - Apple DTS - Dynamic Language Evangelist
- ksand@apple.com
- All opinions expressed are my own, and not related to any company or
- organization. Happy, happy, joy, joy!
-
- +++++++++++++++++++++++++++
-
- From: John Lacey <johnl@spinner.cs.indiana.edu>
- Organization: Computer Science, Indiana University
- Date: Fri, 13 Mar 1992 13:51:30 -0500
-
- ksand@apple.com (Kent Sandvik) writes:
-
- >Anyway,also check out Gambit, a nice Scheme for MacOS including
- >a kit for writing code modules.
-
- Fwiw, I've used lot's of Schemes, and Gambit is the buggiest of them
- all. MacScheme is much better, and more expensive, but the student
- edition is only $40.
-
- - --
- John Lacey, How can I do this? I don't know; and because I do
- johnl@whale.cs.indiana.edu not know, I shall make the attempt. e e cummings
-
- +++++++++++++++++++++++++++
-
- From: podenski@bcsaic.UUCP (Patrick Podenski)
- Date: 16 Mar 92 17:40:02 GMT
- Organization: Boeing Computer Services AI Center, Seattle
-
- In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
- >Hello,
- >
- > I have been swimming into the deep dark waters of
- > C programming and have begun to wonder if there's
- > another language that might provide for both fast
- > prototyping and complete, tight coding for the Mac.
- >
- > Is this true? Is there something comparable in
- > the Mac world? It seems that although C functions
- > and now classes provide for modularity, debugging
- > and integration of these into main() remains too
- > painful and time-consuming for easy prototyping
- > or quick rewrites. Wanna tinker without headaches.
- >
-
- There is hope for the problems you describe. The answer is
- Prograph. Prograph is a visual programming language. It is
- object-oriented, has a powerful user interface builder, a
- completely integrated language environment with the most
- powerful debugging tools I have used.
-
- You can drop down and write C routines when that appeals,
- but Prograph can access the entire Mac toolbox, supports
- AppleEvents, and can twiddle bits if you want to.
-
- TGS (The Gunakara Systems), makers of Prograph, also
- sell separate tools for easily integrating standard C,
- Pascal or Fortran code into a Prograph application.
- The Prograph environment includes both an interpreter
- and a compiler, so you produce standalone Mac
- applications.
-
- Initially, learning to program in a visual programming
- environment can be a challenge, because it is quite
- different than the traditional textual coding
- environments.
-
- You can order the product from places like MacConnection
- for the usual mail order prices.
- The vendor is
-
- TGS Systems
- 2745 Dutch Village Road, Suite 200
- Halifax, Nova Scotia
- B3L4G7
- Canada
- Phone (902) 455-4446
-
- +++++++++++++++++++++++++++
-
- From: tlt38517@uxa.cso.uiuc.edu (Terry Thiel)
- Date: 18 Mar 92 14:24:28 GMT
- Organization: University of Illinois at Urbana
-
- podenski@bcsaic.UUCP (Patrick Podenski) writes:
- >In article <1992Mar8.090833.18530@bronze.ucs.indiana.edu> btaplin@silver.ucs.indiana.edu (Brad Taplin) writes:
- >> I have been swimming into the deep dark waters of
- >> C programming and have begun to wonder if there's
- >> another language that might provide for both fast
- >> prototyping and complete, tight coding for the Mac.
- >There is hope for the problems you describe. The answer is
- >Prograph. Prograph is a visual programming language. It is
- >object-oriented, has a powerful user interface builder, a
- >completely integrated language environment with the most
- >powerful debugging tools I have used.
- >You can order the product from places like MacConnection
- >for the usual mail order prices.
- >TGS Systems
- >2745 Dutch Village Road, Suite 200
- >Halifax, Nova Scotia
- >B3L4G7
- >Canada
- >Phone (902) 455-4446
- They also have an educational discount. Call TGS for details.
- - -Terry
- .
-
- ---------------------------
-
- From: dunigan@thdsun.epm.ornl.gov (Tom Dunigan)
- Subject: making a backup "template" of THINK C project ?
- Date: 16 Mar 92 15:48:36 GMT
- Organization: Oak Ridge National Laboratory
-
- Is there a way to make a copy of one's THINK C project file without
- all the compiled pieces and libraries included -- i.e., just a small
- template of the sources and libraries needed plus compiler/language settings ...?
- or a way to "unbuild" the project?
- or a description of the project file format, so one could write such a utility?
-
- This would be useful for distributing sources of a THINK C application,
- or for recovering from a bug that has destroyed your project file.
- - --
- Tom Dunigan
- dunigan@msr.epm.ornl.gov
-
- +++++++++++++++++++++++++++
-
- From: Daryl_Spitzer@mindlink.bc.ca (Daryl Spitzer)
- Date: 16 Mar 92 18:33:27 GMT
- Organization: MIND LINK! - British Columbia, Canada
-
- > Is there a way to make a copy of one's THINK C project file without
- > all the compiled pieces and libraries included -- i.e., just a small
- > template of the sources and libraries needed plus compiler/language settings
- > ...?
- > or a way to "unbuild" the project?
-
- Have you tried "Remove Objects" in the Project Menu?
-
- Since projects can become corrupted, I keep a backup with the objects removed,
- just in case.
- - --
- - -------------------------------------------------------------------
- Daryl_Spitzer@mindlink.bc.ca "Life isn't just, life just is."
- a2251@mindlink.bc.ca -- Me (I think.)
- Spitzer@UNCAMULT.BITNET
- - -------------------------------------------------------------------
-
- +++++++++++++++++++++++++++
-
- From: bpb9204@tamsun.tamu.edu (Brent)
- Date: 19 Mar 92 04:34:01 GMT
- Organization: Texas A&M Univ., Inc.
-
- dunigan@thdsun.epm.ornl.gov (Tom Dunigan) writes:
- |Is there a way to make a copy of one's THINK C project file without
- |all the compiled pieces and libraries included -- i.e., just a small...
- |or a way to "unbuild" the project?
-
- Yes, you can first make a copy of the project via the Finder, and then
- in Think C you can do a "Remove Objects" command from the Project menu(?).
- This leaves JUST the basic info needed to rebuild the project and a large
- project with 20-30 source files may shrink to about 20k.
-
- |This would be useful for distributing sources of a THINK C application,
- |or for recovering from a bug that has destroyed your project file.
-
- Yep.
-
- As an aside, in my Apple menu (Sys 7), I have an option called "Dev Tools"
- which is a folder containing my assorted development stuff. In there I
- have created a basic Think C project with the ANSI and MacTraps libraries.
- The file is a stationary pad so when I need a new project, I just select
- that file and away I go...
-
- - -Brent
- - --
- - ------------------------------------------------------------------------------
- Brent P. Burton, N5VMG Computer Sci/Physics
- bpb9204@tamsun.tamu.edu Texas A&M University
- - ------------------------------------------------------------------------------
-
- ---------------------------
-
- From: t.g.finstad@fys.uio.no (Terje Finstad)
- Subject: mem/proc-manager, heapzone?
- Date: 17 Mar 92 15:32:50 GMT
- Organization: Fysisk Institutt
-
- I want to get some general information about how to manipulate the data of
- application A from application B under system 7.
-
- I have had a lot use for extending the capabillities of commercial applicat-
- - -ions by writing my own Deskaccessories that manipulates the data structures
- of the the Application opening the DA. I have found the data structures I
- want by searching through the application's master pointers. Well, of course,
- it is the DA that finds the data once (during writing the DA) I have under-
- - -stood the application's organization of it's data. ( Sometimes one may of
- course be so lucky that the application can put the datastructures of interest
- into the scrap - then there is no problems neither under system 6 nor 7 ).
- The DA may also use some of the application's routines by calling routines
- from the applications jump table. (once I understand these routines) These
- DA's do not work under system 7.
-
- There must be a way to just modify what I have of code and still using it.
- In what general direction should I head?. Can I use the process manager to
- get another application's heapzone?. If I could get it's heapzonepointer
- I would get it's data. (I think?) Any hint's would be appreciated.
-
- Sincerely
- Terje Finstad
-
- +++++++++++++++++++++++++++
-
- From: orpheus@reed.edu (P. Hawthorne)
- Date: 18 Mar 92 09:51:39 GMT
- Organization: Reed College, Portland OR
-
-
- t.g.finstad@fys.uio.no (Terje Finstad) writes:
- . I want to get some general information about how to manipulate the data of
- . application A from application B under system 7.
-
- I know that the Dreaded Thought Police have made it seem like you can't
- do anything because it may change in the future, but in this case, you
- may actually be tampering with forces beyond your control.
- Not to rain on your parade here, or anything, but this seems like a
- doomed effort unless you can adapt to every new version of the system,
- the apps involved, and the architectures of the Macintosh itself.
- Do not expect to be able to address memory across application
- boundaries. Think of it as being in one country, and trying to spy into
- another without going there. Handle your interprocess communication with
- a messenger of some sort, whether it be network entities or extentions.
-
- . I have had a lot use for extending the capabillities of commercial applicat-
- . ions by writing my own Deskaccessories that manipulates the data structures
- . of the the Application opening the DA.
-
- I guess this could be done, but have never had enough courage to spend any
- time on it. Since the slightest whim of a compiler could blow you out of the
- water, I would imagine that you would need to make this an entirely in house
- productivity trick. Even at this point, I find it easier to work within the
- confines of the operating system. Get the applications in question to respond
- to menu choices and play with their window structures, and try and stay away
- from stuff that changes from compile to compile...
-
- . I have found the data structures I want by searching through the
- . application's master pointers. Well, of course, it is the DA that finds
- . the data once (during writing the DA) I have understood the
- . application's organization of it's data.
-
- You should get a title like reverse engineer or something. Have you found
- that there are any applications which are easier to figure out than others?
-
- .(Sometimes one may of course be so lucky that the application can put the
- . datastructures of interest into the scrap - then there is no problems
- . neither under system 6 nor 7).
-
- How do you selectively retrieve what is on the clip? Do you stick to well
- defined standards like PICT and TEXT? Can you preserve the clip so that the
- user never notices what has happened once you are done?
-
- . The DA may also use some of the application's routines by calling
- . routines from the applications jump table. (once I understand these
- . routines) These DA's do not work under system 7.
-
- This sounds like a phenomenal way to get inside things and play around.
- Pardon my naivete, but doesn't this crash intermittantly with a 68020 or
- better, regardless of what the system version is?
-
- . There must be a way to just modify what I have of code and still using
- . it. In what general direction should I head?. Can I use the process
- . manager to get another application's heapzone?. If I could get it's
- . heapzonepointer I would get it's data. (I think?) Any hint's would be
- . appreciated.
-
- Code is like an apartment or a significant other. Every once and a
- while, it's nice to start all over again. Copy and paste your code into
- new projects which do not depend upon the layout of the heap zone, since
- that could wipe out your project in the near future.
- Look at ways to make INITs that patch system traps. There are some fine
- examples of that around, such as Adobe Typeface Manager and Suitcase. Get
- those, tear them apart, and see what you think.
- I must say, it sounds like you could do a great job at it.
-
- Theus (orpheus@reed.edu)
-
- +++++++++++++++++++++++++++
-
- From: t.g.finstad@fys.uio.no (Terje Finstad)
- Organization: Dept. Physics
- Date: Wed, 18 Mar 1992 19:22:00 GMT
-
- orpheus@reed.edu (P. Hawthorne) writes:
- > t.g.finstad@fys.uio.no (Terje Finstad) writes:
- > . I want to get some general information about how to manipulate the data of
- > . application A from application B under system 7.
-
- Request for suggestions still applies,
- allthough P. Hawthorne seems to suggest to forget it?
-
- > doomed effort unless you can adapt to every new version of the system,
- > the apps involved, and the architectures of the Macintosh itself.
-
- Well, so far these things/"the effort" has been working from the system of 85
- up till sys. 6.07.
-
- > . I have had a lot use for extending the capabillities of commercial applicat-
- > . ions by writing my own Deskaccessories that manipulates the data structures
- > . of the the Application opening the DA.
- >
- > I guess this could be done, but have never had enough courage to spend any
- > time on it. Since the slightest whim of a compiler could blow you out of the
- > water, I would imagine that you would need to make this an entirely in house
- > productivity trick. Even at this point, I find it easier to work within the
- > confines of the operating system. Get the applications in question to respond
-
- Calling the memory manager to get the applications heapzone is working
- within the operating system.
-
- > You should get a title like reverse engineer or something. Have you found
- > that there are any applications which are easier to figure out than others?
-
- No comments
-
- > 1 How do you selectively retrieve what is on the clip? 2 Do you stick to well
- > defined standards like PICT and TEXT? 3 Can you preserve the clip so that the
- > user never notices what has happened once you are done?
-
- 1. Well, as you know, you choose the Restype yourself in GetScrap.
- 2. No
- 3. Well I am also the user. But, yes, changing the scrap requires the applications
- do not assume what they placed there will always be what they get back, but there
- does not seem to be a problem( I call ZeroScrap in between get and put, and the
- application is supposed to think the scrap has changed, but from my limited
- experience these/my applications do not assume the scrap is unchanged anyhow.
-
- > . ..using routines from the application's jumptable
- > Pardon my naivete, but doesn't this crash intermittantly with a 68020 or
- > better, regardless of what the system version is?
-
- No, not by the different CPU's but whether anything like that can be done (easily)
- with system 7 - I have no idea and part of my original request.
-
- > Code is like an apartment or a significant other. Every once and a
-
- OK I'm ready for the junkyard
-
-
- ---------------------------
-
- From: hankin@sauron.osf.org (Scott Hankin)
- Subject: THINK C wish - tags?
- Organization: Open Software Foundation
- Date: 17 Mar 92 16:29:24 GMT
-
- As interesting as the C++ discussion has been, my needs are more
- mundane. Many times I find myself working with a system of many files,
- and THINK C gives me a message that a particular function call does not
- match the prototype. I am then left to try and find that prototype,
- and correct the offending line.
-
- On Unix, this process is greatly simplified by the use of tags files.
- A tags file is created by running a relatively dumb program over one or
- more source files. Information is collected on global variable
- definitions, function definitions, typedefs and macros. The editor can
- then take you to the file that defined a given variable or function and
- position the cursor on the appropriate line. It is much faster than
- any automated file search (.e.g. grep, multi-file search) because the
- information is already in an easily searched format.
-
- However, the compiler has all this information and then some. It can
- do this job far better than a separate utility. It's just a matter of
- collecting the information, and providing an interface to the editor.
-
- This touches upon a second unfortunate feature of THINK C. I really
- like the feature which provides you with a list of all the include
- files seen when compiling a particular file. The list is only
- available after the file has been successfully compiled, however. This
- is frustrating because it is often useful to have that list to aid in
- tracking down errors in the file. Often I get one of those prototype
- mismatches, but have to try and search down the file containing the
- prototype manually. This wastes a lot of time. It is particularly
- annoying because I know that at the point at which the error occurs,
- all the include files have in fact been read.
-
- As a colleague of mine is so fond of saying, "It's just a simple matter
- of programming..."
-
- Does anyone else work this way?
-
- - - Scott
- Scott Hankin (hankin@osf.org)
- Open Software Foundation
- 11 Cambridge Center
- Cambridge, MA 02142
-
- +++++++++++++++++++++++++++
-
- From: pete@medea.rice.edu (Louis Wu)
- Organization: Whatsamatta U
- Date: Tue, 17 Mar 1992 23:14:25 GMT
-
-
- The Alpha text editor create tags for function declarations and has a list
- dialog that allows you to jump to the declaration. However, it doesn't do
- prototype declarations.
-
- - --
- =============================================================================
- Pete Keleher "Relax! Don't worry! Have a homebrew!" pete@cs.rice.edu
- =============================================================================
-
-
- +++++++++++++++++++++++++++
-
- From: spencer@panix.com (David Spencer)
- Date: Wed, 18 Mar 1992 12:57:19 GMT
- Organization: PANIX Public Access Unix, NYC
-
- In <hankin.700849764@osf> hankin@sauron.osf.org (Scott Hankin) writes:
-
- >[I] like the feature which provides you with a list of all the include
- > files seen when compiling a particular file. The list is only
- > available after the file has been successfully compiled, however.
-
- create a file called dummy.c that #includes all your .h files, but
- nothing else; then compile it. All the .h's are then available by
- option-clicking the title bar of the project window.
-
- >Open Software Foundation
-
- I won't report you to rms.
-
- David Spencer spencer@panix.com
-
- ---------------------------
-
- From: speth@cats.ucsc.edu (James Gustave)
- Subject: Comm Toolbox Code Snippets?
- Date: 18 Mar 92 02:22:17 GMT
- Organization: University of California, Santa Cruz
-
-
- Does anyone have the little bits of code from the beginning of Inside the
- Macintosh Communications Toolbox?? I really don't feel like typing them in
- if I don't have to :)
-
- Actually any little snippets of code using the Comm Toolbox would be great.
- Thanks.
-
- - --
- Jim Speth
- speth@cats.ucsc.edu
-
- +++++++++++++++++++++++++++
-
- From: zobkiw@world.std.com (Joe Zobkiw)
- Date: 18 Mar 92 16:21:26 GMT
- Organization: The World Public Access UNIX, Brookline, MA
-
- You should get a hold of the "CShell" source from the Developer CD...it
- does some comm toolbox stuff and contains full C source.
-
- It's probably on ftp.apple.com also.
-
- <joe>
-
-
- - --
- <--------------------------------------------------->
- joe zobkiw zobkiw@world.std.com
- mac.synthesis.MIDI.development.C.asm.communications
- >---------------------------------------------------<
-
- ---------------------------
-
- From: bakker@fwi.uva.nl (Harry Bakker (I87))
- Subject: How do I plot icons?
- Date: 18 Mar 92 13:55:35 GMT
- Organization: FWI, University of Amsterdam
-
-
- Greetings to all the rescue rangers!
-
- The Mac introduced to the world a windows oriented system, complete with icons.
- So you would think icons are heavilly supported. Well, I think not.
- Fer example: I wanted to fetch the drive-icon of a floppydisk. So I called
- PBControl with csCode = 22 (I think that's the number, but since I'm doing
- this by head, it could be uncorrect. However, I my program it's ok). This call
- is supposed to give me a Ptr to an icon structure (bitmap and mask). The trouble
- starts when I try to plot the icon. The PlotIcon routine wants a HANDLE, but I
- got a PTR. So I converted the pointer to a handle, by passing the ADDRESS of
- the pointer to PlotIcon. Well, it did plot something, but it sure didn't look
- like a proper icon. To make the problem worse, there are a lot of other routines
- (for example the desktop database routines) that all return POINTERS to icons.
-
- Now my question: could somebody help me at this point? How do I plot an icon,
- if I only have a POINTER to it?
-
- Thanks in advance.
-
- Harry Bakker
- (bakker@fwi.uva.nl)
-
- +++++++++++++++++++++++++++
-
- From: potts@itl.itd.umich.edu (Paul Potts)
- Organization: Instructional Technology Laboratory, University of Michigan
- Date: Wed, 18 Mar 92 15:12:43 GMT
-
- bakker@fwi.uva.nl writes:
-
- >Greetings to all the rescue rangers!
- >
- >The Mac introduced to the world a windows oriented system, complete with icons.
- >So you would think icons are heavilly supported. Well, I think not.
-
- "I think not?" The Macintosh is highly icon- and window-oriented.
- This is a pretty presumptuous statement, given that your entire evidence
- for this seems to be a bug in your program that you can't figure out.
-
- >... The trouble
- >starts when I try to plot the icon. The PlotIcon routine wants a HANDLE, but I
- >got a PTR. So I converted the pointer to a handle, by passing the ADDRESS of
- >the pointer to PlotIcon.
-
- You can't do this. A Handle is an operating system object. Simply taking the
- address of a pointer and calling it a handle won't do. The Operating System
- didn't create this object - how would it know the size of the object,
- who it belongs to, whether it is locked or unlocked, purgeable or nonpurgeable,
- etc.? Take a look at Inside Macintosh. Trying to program the Mac without a
- basic knowledge of the memory manager is also rather presumptuous...
-
- >Now my question: could somebody help me at this point? How do I plot an icon,
- >if I only have a POINTER to it?
-
- Inside Macintosh volume 2, p. 375:
-
- PtrToHand (srcPtr: Ptr; VAR dstHandl: Handle; size: LONGINT): OSERR;
-
- Pass this routine your pointer and the number of bytes that you wish
- to copy (in the "size" parameter). In C you could pass as the size
- parameter (long)sizeof(your pointer). Remember to dispose of the
- handle when you are done with it. You could also use PtrToXHand, if
- you have created the handle ahead of time.
-
-
- - --
- -Paul Potts-potts@itl.itd.umich.edu-
- "The amounts of nicotine that are tolerated by adult smokers can produce
- symptoms of poisoning and could prove fatal if Habitrol systems are applied
- or ingested by children or pets." - Habitrol(TM) drug ad, information sheet.
-
- ---------------------------
-
- From: jack@umbio.med.miami.edu (Jack Herrington)
- Subject: Think C 5.0.2 and MacTCP DNR...
- Date: 18 Mar 92 20:07:27 GMT
- Organization: University of Miami Medical School
-
- Just to start off, I'd like to say 'Thanks' for all the help in the past...
- You are a really cool bunch of people for responding so quickly with
- valuable information.
-
- Now, on to the real story. Today's Problem: OpenResolver(nil) and
- CloseResolver() work fine, or at least I think the do, the respond with
- 'noErr'. This is after I re-compiled the dnr.o with MPW C to remove
- the 'TrapAvaliable' which is multiply defined.
-
- When I use 'StrToAddr' with all the right parameters, it returns back
- with 'CacheFault' (ok, I can buy that). And so I loop (right now I am
- just in the testing phase, so it's ok to loop infitely). My callback
- breaks me about about half a second later with a rtnCode of '-1'. The
- cname it gives me is the name I give it 'umbio', plus the domain
- '.med.miami.edu' but with two bytes of crap at the beginning. ALSO,
- the address return is 0L, so it didn't get it.
-
- So should the string passed to 'StrToAddr' be pascal? It seems to just
- hang when I send a 'C' string. It's a dumb question I know, but when
- faced with a 'wall' of weirdness you have to try weird things to get
- around it.
-
- Anyway, thanks for any helpful advice you can give me.
- - --
- "Electric word 'life', it means forever and that's a might long time. But I'm
- here to tell yah, there's something else... The after-life, a word of
- never-ending happiness, you can always see the sun, day or night. So when you
- call up that shrink in Beverly hills, you know the one, Dr. everything-we-all-
-
- +++++++++++++++++++++++++++
-
- From: resnick@cogsci.uiuc.edu (Pete Resnick)
- Organization: University of Illinois at Urbana
- Date: Wed, 18 Mar 1992 22:23:14 GMT
-
- jack@umbio.med.miami.edu (Jack Herrington) writes:
-
- >When I use 'StrToAddr' with all the right parameters, it returns back
- >with 'CacheFault' (ok, I can buy that). And so I loop (right now I am
- >just in the testing phase, so it's ok to loop infitely). My callback
- >breaks me about about half a second later with a rtnCode of '-1'. The
- >cname it gives me is the name I give it 'umbio', plus the domain
- >'.med.miami.edu' but with two bytes of crap at the beginning. ALSO,
- >the address return is 0L, so it didn't get it.
-
- The rtnCode field in hostInfo is delcared as int. In MPW, that's
- a long; in THINK C, that is (usually) a short. Change the type
- in AddressXlation.h to long and you will be fine.
-
- pr
- - --
- Pete Resnick (...so what is a mojo, and why would one be rising?)
- Graduate assistant - Philosophy Department, Gregory Hall, UIUC
- System manager - Cognitive Science Group, Beckman Institute, UIUC
- Internet: resnick@cogsci.uiuc.edu
-
- ---------------------------
-
- From: a-giles@uchicago.edu (Aaron Giles)
- Subject: Where do I submit my freeware app?
- Organization: University of Chicago High Energy Physics
- Date: Wed, 18 Mar 1992 23:06:17 GMT
-
- Well, I finally put everything together and am now ready to release my
- first Mac application to the cruel real world. I remember hearing
- once that there was some way to get it posted to the majors (info-mac,
- UMich, UTexas) as well as put up on comp.binaries.mac all in one fell
- swoop, but I can't for the life of me remember how that worked.
- Either that, or it was all in a dream I once had. :-) If the latter
- case is true, then I'd appreciate a description of the usual
- formalities involved in posting directly to these sources.
-
- Thanks a million!
- Aaron
- - -----
- Aaron Giles -- a-giles@uchicago.edu
- "You can't have everything ... where would you put it?"
-
- +++++++++++++++++++++++++++
-
- From: triantos@acsu.buffalo.edu (Nick B Triantos)
- Date: 19 Mar 92 04:49:46 GMT
- Organization: The University at Buffalo
-
- If I remember correctly, the FAQ says that mailing it to
- macgift@rascal.ics.utexas.edu, probably compressed with either StuffIt or
- Compact Pro, binhexed, and with a brief description at the top, will get
- distribution to sumex, rascal, umich, and comp.binaries.mac...
-
- Nice to hear it's freeware, BTW!
-
- - -Nick
-
- - --
- Nick Triantos Grad Student, University at Buffalo. Why? I DON'T KNOW!
- "...and besides, she's a psycho hose-beast." - Wayne, from Wayne's World
-
- I! Hi'm a mtatng siugnaturei vir*ss. You cann~t reisth elping me spre]d !
-
- ---------------------------
-
- From: gmarzot@mitre.org (G. S. Marzot (Joe))
- Subject: Programmer furniture
- Date: 4 Mar 92 18:43:18 GMT
- Organization: The MITRE Corporation
-
- This is not a joke. I was just wondering if there was any particular
- chair that programmers find saticfactory. for example the kneeling style
- chair or anything else that releives the strain of sitting in front of a
- terminal for extended time periods. Thanks for any input, GSM
-
-
- Email: gmarzot@linus.mitre.org
-
- (standard disclaimer)
-
- - -------------------------
-
- From: sje@xylos.ma30.bull.com (Steven J. Edwards)
- Date: 5 Mar 92 22:05:31 GMT
- Organization: Bull HN, Worldwide Information Systems, Billerica, Mass., USA
-
- In article <1992Mar4.184318.12569@linus.mitre.org> gmarzot@mitre.org (G. S. Marzot (Joe)) writes:
- > This is not a joke. I was just wondering if there was any particular
- > chair that programmers find saticfactory. for example the kneeling style
- > chair or anything else that releives the strain of sitting in front of a
- > terminal for extended time periods. Thanks for any input, GSM
- >
- > Email: gmarzot@linus.mitre.org
-
- You are correct: it is not a joke.
-
- I have tried a good number of programmer's chairs over the
- last two decades including the two platform kneeler, the fixed back,
- the two axis tilt, and so forth. I have settled upon a straight and
- flat back, forward to rearward single axis tilt, four wheel caster
- with three-quarter length armrests. The chair back reaches up to
- about three-fifths of my spine. All contact surfaces are slightly
- padded and have a smooth vinyl finish. Of course, chair height,
- caster resistance, and the tilt resistance are adjustable. The chair
- remains stable in all by the most outrageous tilt positions and has a
- comfortable lean-back stability point. It is somewhat broader in the
- beam than I am to allow for a bit of relaxing lateral movement. I
- have two desks in my home office and I can easily propel the chair
- from one to the other while remaining seated.
-
- A good chair is expensive, but my current home chair is in its
- eighth year and is still going strong. Ten minutes a year is
- sufficient for maintenance, mostly lubrication and cleaning the
- bearings. It is possible that its replacement may have a higher back.
- There is also the problem of occasional stubbed toes due to the long
- caster arm supports, this from usually programming at home shoeless.
- The chair at work is similar.
-
- I have not seen any good programmer's chairs for less than
- about US$250 nowadays.
-
- [The above opinions expressed are my own; not necessarily held by others.]
- == Steven J. Edwards Bull HN Information Systems Inc. ==
- == (508) 294-3484 300 Concord Road MS 820A ==
- == sje@xylos.ma30.bull.com Billerica, MA 01821 USA ==
- "That Government which Governs the Least, Governs Best." -- Thomas Jefferson
-
- - -------------------------
-
- From: orpheus@reed.edu (P. Hawthorne)
- Date: 5 Mar 92 21:24:27 GMT
- Organization: Reed College, Portland OR
-
-
- gmarzot@mitre.org (G. S. Marzot (Joe)) writes:
- : I was just wondering if there was any particular chair that programmers
- : find satisfactory. For example, the kneeling style chair or anything else
- : that releives the strain of sitting in front of a terminal for extended
- : time periods.
-
- I find it best to move chairs around depending on what I am doing. It's
- the ultimate cop out, I know. Everything seems to depend on what you're
- doing, but it makes sense that chairs have their uses too. Plus, I enjoy
- the ritualist aspect of rolling another chair over.
-
- If I am writing new sections of code, I prefer secretarial chairs on
- swivels without arm rests so that I can twist and turn to reach books or
- the stereo. For analysis and testing, with their relatively long periods of
- quiet contemplation, I prefer a comfy chair with arm rests.
-
- I don't like the kneeling style chairs, even the ones on wheels. For me,
- anyway, they get irritating after a couple of hours because they are just
- transferring strain to your legs rather than your spine. Imagine kneeling
- for hours at a time. I prefer to sit.
-
- Theus (orpheus@reed.edu)
-
- +++++++++++++++++++++++++++
-
- From: biesty@ide.com (Bill Biesty)
- Date: 18 Mar 92 02:45:02 GMT
- Organization: IDE, San Francisco
-
- In article <1992Mar4.184318.12569@linus.mitre.org> gmarzot@mitre.org
- (G. S. Marzot (Joe)) wants to know what kind of chair is best for
- programming for long periods of time.
-
- I prefer a chair that tilts back and forth on the seat. the ones that
- just angle the back are cheaper but are not comfortable when
- leaning back. Arm rests are optional. (Sometimes they encourage bad
- posture, but they help shift weight off of the back and rear end.)
-
- Get durable padding in the seat. It's hard to get a chair with
- good padding without spending a ton on other not so useful features.
- But I have a chair now that I start to feel the bolts by the end
- of the day.
-
- I've tried the two platform chairs. I didn't find them confortable
- since I could not adjust the angles of the platforms.
-
- - --
- Bill Biesty
- <biesty@ide.com> These are not the opinions of my employer.
-
- ---------------------------
-
- End of C.S.M.P. Digest
- **********************
-